package com.guozcc.bootweb.platform.annotation;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.lang.annotation.*;

@Target({ElementType.TYPE,ElementType.METHOD})//类、方法生效
@Retention(RetentionPolicy.RUNTIME)//运行时生效
@Documented
@RequestMapping
public @interface Trade {

    //覆盖RequestMapping注解的value属性
    @AliasFor(annotation = RequestMapping.class,attribute = "value")
    String tradeCode() ;

    String tradeName() default "";

    @AliasFor(annotation = RequestMapping.class,attribute = "method")
    RequestMethod[] method() default RequestMethod.POST;

    //登录校验
    boolean checkLogin() default true;


}
